﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CondominioG1.Dominio.Reserva>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Numero
            </th>
            <th>
                Fecha
            </th>
            <th>
                Personas
            </th>
            <th>
                Residente
            </th>
            <th>
                Area
            </th>
            <th>
                Comentario
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Editar", "Edit", new { Numero = item.Numero })%> |
                <%: Html.ActionLink("Detalles", "Details", new { Numero = item.Numero })%> |
                <%: Html.ActionLink("Eliminar", "Delete", new { Numero = item.Numero })%>
            </td>
            <td>
                <%: item.Numero %>
            </td>
            <td>
                <%: String.Format("{0:dd/MM/yyyy}", item.Fecha)%>
            </td>
            <td>
                <%: item.Personas %>
            </td>
             <td>
                <%: item.Residente.Dni %>
            </td>
            <td>
                <%: item.Area.Tipo %>
            </td>
            <td>
                <%: item.Comentario %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Crear", "Create") %>
    </p>

</asp:Content>

